//---------------------------------------------------------------------------
#ifndef SettingsFormH
#define SettingsFormH
//---------------------------------------------------------------------------
#include <Classes.hpp>
#include <Controls.hpp>
#include <StdCtrls.hpp>
#include <Forms.hpp>
#include "cspin.h"
#include <ComCtrls.hpp>
#include <ExtCtrls.hpp>
#include "MainForm.h"
//---------------------------------------------------------------------------
typedef struct {
	UnicodeString name, des;
	int mc;
} posinf;
typedef struct {
	UnicodeString name, des;
	bool form, state;
} trninf;
class TSF : public TForm {
__published: //IDE-managed Components
	TPageControl *PC;
	TTabSheet *General;
	TTabSheet *Position;
	TTabSheet *Transition;
	TPanel *PosP;
	TPanel *GenP;
	TPanel *TrnP;
	TLabel *Label1;
	TLabel *Label2;
	TMemo *DPosM;
	TComboBox *NPosCB;
	TLabel *Label3;
	TCSpinEdit *CountSE;
	TCheckBox *PosChB;
	TLabel *Label4;
	TComboBox *NTrnCB;
	TLabel *Label5;
	TMemo *DTrnM;
	TCheckBox *FormChB;
	TCheckBox *StChB;
	TLabel *Label6;
	TEdit *PosNE;
	TLabel *Label7;
	TEdit *TrnNE;
	TButton *SaveB;
	TButton *CancelB;
	TButton *ApplyB;
	TButton *Button1;
	TButton *Button2;
	TButton *Button3;
	TButton *Button4;
	TButton *Button5;
	TButton *Button6;
	void __fastcall NPosCBChange(TObject *Sender);
	void __fastcall NTrnCBChange(TObject *Sender);
	void __fastcall FormShow(TObject *Sender);
	void __fastcall NPosCBKeyPress(TObject *Sender, wchar_t &Key);
	void __fastcall CountSEChange(TObject *Sender);
	void __fastcall CountSEKeyPress(TObject *Sender, wchar_t &Key);
	void __fastcall SaveBClick(TObject *Sender);
	void __fastcall FormChBMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);
	void __fastcall ApplyBClick(TObject *Sender);
	void __fastcall CancelBClick(TObject *Sender);
	void __fastcall DTrnMKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall DPosMKeyUp(TObject *Sender, WORD &Key, TShiftState Shift);
	void __fastcall PosChBMouseDown(TObject *Sender, TMouseButton Button, TShiftState Shift, int X, int Y);


private: //User declarations
	vector <posinf> p, p0;
	vector <trninf> t, t0;
	void changePositionList();
	void changeTransitionList();
	void SaveSettings();
public: //User declarations
	void Clear();
	__fastcall TSF(TComponent* Owner);
};
//---------------------------------------------------------------------------
extern PACKAGE TSF *SF;
//---------------------------------------------------------------------------
#endif
